#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.12.0
 Author:         Tody Guo

 Script Function:
   check Drv Letter is corrected...

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#NoTrayIcon

$STDStr="C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:"

Func CheckDriver()
   dim $isODD=False
   dim $str

   Local $FixArray = DriveGetDrive("FIXED")
   If @error Then
	  ; An error occurred when retrieving the drives.
	  MsgBox(48, "", "It appears an error occurred.")
   EndIf

   For $i=1 To $FixArray[0]
	  $str=$str&StringUpper($FixArray[$i])
   Next

   Local $CDROMArray = DriveGetDrive("CDROM")
   If @error Then
	  ; An error occurred when retrieving the drives.
	  MsgBox(48, "", "It appears an error occurred.")
	  $isODD=False
   EndIf

   If not $CDROMArray[0] = 0 Then
	  $str=$str&StringUpper($CDROMArray[1])
   EndIf

   If Not StringInStr($STDStr, $str) = 0 Then
	  ConsoleWrite("Fixed Drive pass: "&$str&@LF)
	  ConsoleWrite("Return code: 0")
	  Exit (0)
   Else
	  ConsoleWrite("Fixed Drive fail: "&$str&@LF)
	  ConsoleWrite("Return code: 1")
	  Beep(2500)
	  Sleep(10)
	  Beep(2500)
	  Sleep(10)
	  Beep(2500)
	  Exit(1)
   EndIf
EndFunc

Func main()
   CheckDriver()
EndFunc

main()